﻿@using DualControl.Web.Startup
@using DualControl.CommonServices
@{
    ViewBag.CurrentPageName = PageNames.Home; // The menu item will be active for this page.
}
@model DualControl.CompanyInfos.Dtos.CompanyInfoListDto
@section styles {
    <link href="~/lib/morris.js/morris.css" rel="stylesheet" asp-append-version="true" />
}
@section scripts
    {
    <environment names="Development">
        <script src="~/lib/jquery-countTo/jquery.countTo.js" asp-append-version="true"></script>
        <script src="~/lib/raphael/raphael.js" asp-append-version="true"></script>
        <script src="~/lib/morris.js/morris.js" asp-append-version="true"></script>
        <script src="~/lib/chart.js/dist/Chart.bundle.js" asp-append-version="true"></script>
        <script src="~/lib/Flot/jquery.flot.js" asp-append-version="true"></script>
        <script src="~/lib/Flot/jquery.flot.resize.js" asp-append-version="true"></script>
        <script src="~/lib/Flot/jquery.flot.pie.js" asp-append-version="true"></script>
        <script src="~/lib/Flot/jquery.flot.categories.js" asp-append-version="true"></script>
        <script src="~/lib/Flot/jquery.flot.time.js" asp-append-version="true"></script>
        <script src="~/lib/jquery-sparkline/dist/jquery.sparkline.js" asp-append-version="true"></script>
        <script src="~/view-resources/Views/Home/Index.js" asp-append-version="true"></script>
    </environment>
    <environment names="Staging,Production">
        <script src="~/view-resources/Views/_Bundles/home-index.min.js" asp-append-version="true"></script>
    </environment>
}
@inject ICommonService CommonService
<div class="row clearfix">
    <!-- Task Info -->
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="card">
            <div class="header">
                <h2>企业概况 <button id="btncompanyinfo" class=".btn-default">展开</button></h2>

            </div>

            <div class="body" id="companyinfo">
                <div class="table-responsive">
                    <table class="table table-hover dashboard-task-infos">
                        @{

                            if (Model != null)
                            {

                                <tbody>
                                    <tr>
                                        <td>企业名称</td>
                                        <td colspan="5">@Model.CompanyFullName </td>


                                    </tr>
                                    <tr>
                                        <td>企业地址</td>
                                        <td colspan="3">
                                            @Model.Address
                                        </td>
                                        <td>邮政编码</td>
                                        <td>@Model.ZipCode</td>
                                    </tr>
                                    <tr>
                                        <td>安全机构人员</td>
                                        <td colspan="5">
                                            @Model.Safetyofficer
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>员工总数</td>
                                        <td>@Model.EmployeeNumber</td>
                                        <td>专职/兼职安全员</td>
                                        <td>@Model.SafetyManagermentPerson</td>
                                        <td>
                                            特种作业人数
                                        </td>
                                        <td>@Model.SpecialOperationNumber</td>
                                    </tr>
                                    <tr>
                                        <td>法定代表</td>
                                        <td>@Model.LegalRepresentative</td>
                                        <td>
                                            固定电话
                                        </td>
                                        <td>@Model.ContactPhone</td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td>联系人</td>
                                        <td>@Model.Contact</td>
                                        <td>
                                            固定电话
                                        </td>
                                        <td>@Model.ContactFixedPhone</td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td>生产许可证</td>
                                        <td>@Model.ProductionLicense</td>
                                        <td>有效期</td>
                                        <td>@Model.ExpireTime</td>
                                    </tr>
                                    <tr>
                                        <td>开采方式</td>
                                        <td>@Model.MiningMethod</td>
                                        <td>生产规模</td>
                                        <td>@Model.ProductionScale</td>
                                    </tr>
                                    <tr>
                                        <td>企业是否存在危险作业场所</td>
                                        <td colspan="5">
                                            @foreach (var accident in CommonService.HazardousWorkPlaceTypes())
                                            {

                                                @if (Model.HazardousWorkPlaceTypes.Contains(accident.Key.ToString()))
                                                {

                                                    <input type="checkbox" name="accidentlist" onclick="return false;" value="@accident.Key" title="@accident.Value" class="filled-in" checked="checked" id="role-@accident.Key" />
                                                    @accident.Value
                                                }
                                                else
                                                {
                                                    <input type="checkbox" name="accidentlist" onclick="return false;" value="@accident.Key" title="@accident.Value" class="filled-in" id="role-@accident.Key" />
                                                    @accident.Value
                                                }

                                            }

                                        </td>
                                    </tr>
                                    <tr>
                                        <td>企业概况</td>
                                        <td colspan="5">@Model.BriefIntroduction</td>
                                    </tr>

                                </tbody>
                            }
                            else
                            {
                                <tr><td>没有信息</td></tr>
                            }
                        }
                    </table>
                </div>
            </div>
        </div>
    </div>

</div>


<div class="block-header">
    <h2>我的工作任务</h2>
</div>
<!-- Widgets -->
<div class="row clearfix">
    <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
        <div class="info-box bg-pink hover-expand-effect">
            <div class="icon">
                <i class="material-icons">playlist_add_check</i>
            </div>
            <div class="content">
                <div class="text">我的待排查任务</div>
                <div class="number count-to" data-from="0" data-to="20" data-speed="1000" data-fresh-interval="20"></div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
        <div class="info-box bg-cyan hover-expand-effect">
            <div class="icon">
                <i class="material-icons">help</i>
            </div>
            <div class="content">
                <div class="text">我的整改任务</div>
                <div class="number count-to" data-from="0" data-to="10" data-speed="1000" data-fresh-interval="20"></div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
        <div class="info-box bg-light-green hover-expand-effect">
            <div class="icon">
                <i class="material-icons">forum</i>
            </div>
            <div class="content">
                <div class="text">我的工作</div>
                <div class="number count-to" data-from="0" data-to="243" data-speed="1000" data-fresh-interval="20"></div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
        <div class="info-box bg-orange hover-expand-effect">
            <div class="icon">
                <i class="material-icons">person_add</i>
            </div>
            <div class="content">
                <div class="text">我的其它工作</div>
                <div class="number count-to" data-from="0" data-to="1225" data-speed="1000" data-fresh-interval="20"></div>
            </div>
        </div>
    </div>
</div>

